package com.sgy.zkclient;

import org.I0Itec.zkclient.ZkClient;

public class DeleteNote {

    /*
    * 借助zkclient完成会话的创建
    * */
    public static void main(String[] args) {
        /*
        * zkclient通过对zookeeperAPI内部封装，将异步创建会话过程同步化
        * */
        ZkClient zkClient = new ZkClient("192.168.201.129:2181");
        System.out.println("会话已创建...");

        // 递归删除节点
        String path = "/zkclient/c1";
        zkClient.createPersistent(path + "/c11");
        zkClient.deleteRecursive("/zkclient/c1");
        System.out.println("递归删除成功...");
    }
}
